home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C++ / Frameworks / Argus Frameworks 2.1 / Argus Libraries 2.1 / Argus Standards / ArgusAbout.cp next >
Text File  |  1995-12-21  |  2KB  |  86 lines

  1. /**********************************************************************
  2.  
  3.     ArgusAbout.cp
  4.  
  5. ***********************************************************************/
  6.  
  7. /*
  8.     Functions Include:
  9.     
  10.       MyAboutDialog           Standard Argus About Dialog
  11. */
  12.  
  13. /********** Includes */
  14. #include <Dialogs.h>
  15. #include "Fn_Prototypes.h"
  16. #include "ArgusHelp.h"
  17.  
  18. #include "MainWindow.h"    // may need to modify
  19.  
  20. /********** Defines */
  21. #define ABOUT_DLOG     599
  22. #define NIL_PTR        0L
  23. #define ALLOCATE_MEM   0
  24. #define IN_FRONT       (WindowPtr)-1L
  25. #define OK_BUTTON      1
  26. #define HELP_BUTTON    2
  27.  
  28.  
  29. /********** Prototypes */
  30. Boolean MyAboutDialog( void );
  31.  
  32.  
  33. /********** MyAboutDialog */
  34.  
  35. Boolean MyAboutDialog( void )
  36. {
  37.     WindowPtr   docWindow;
  38.     DialogPtr   dialog;
  39.     Boolean     done;
  40.     Boolean     result;
  41.     short       itemHit;
  42.     short       itemType;
  43.     Handle      itemHandle;
  44.     Rect        itemRect;
  45.     EventRecord theEvent;
  46.  
  47.     result = FALSE;
  48.  
  49.     docWindow = FrontWindow();
  50.     if( docWindow != NIL_PTR )
  51.         MyDoDeactivateWindow( docWindow );
  52.  
  53.     dialog = GetNewDialog( ABOUT_DLOG, ALLOCATE_MEM, IN_FRONT );
  54.  
  55.     if( dialog == NIL_PTR )
  56.         return( result );
  57.  
  58.     /* AdjustMenus_(); */
  59.  
  60.     ShowWindow( dialog );
  61.     FnMisc_FrameButton( dialog, OK_BUTTON );
  62.  
  63.     done = FALSE;
  64.     while( done == FALSE )
  65.     {
  66.         ModalDialog( nil, &itemHit );
  67.  
  68.         switch( itemHit )
  69.         {
  70.             case OK_BUTTON:
  71.                 result = TRUE;
  72.                 done = TRUE;
  73.                 break;
  74.             case HELP_BUTTON:
  75.                 DisposeDialog( dialog );
  76.                 MyHelpDialog();
  77.                 done = TRUE;
  78.                 return( result );
  79.                 break;
  80.         }
  81.      }
  82.     DisposDialog( dialog );
  83.     return( result );
  84. }
  85.  
  86. // End of File